home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
faq
/
amsls497.zip
/
AMOSLIST
/
000134_amos-request@svcs1.digex.net_Tue Apr 15 23:48:32 1997.msg
< prev
next >
Wrap
Internet Message Format
|
1997-05-01
|
3KB
Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id XAA08244
for <mcox@access.digex.net>; Tue, 15 Apr 1997 23:48:31 -0400 (EDT)
Received: (from daemon@localhost)
by svcs1.digex.net (8.8.5/8.8.5) id WAA14424
for amos-out; Tue, 15 Apr 1997 22:13:16 -0400 (EDT)
Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id WAA14421
for <amos-list@svcs1.digex.net>; Tue, 15 Apr 1997 22:13:15 -0400 (EDT)
Received: from dealer.aristocrat.com.au (dealer.aristocrat.com.au [203.16.181.81])
by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id WAA01924
for <amos-list@access.digex.net>; Tue, 15 Apr 1997 22:13:09 -0400 (EDT)
Received: by dealer.aristocrat.com.au (8.7.5/8.7.3) with SMTP id MAA10307 for <amos-list@access.digex.net>; Wed, 16 Apr 1997 12:17:03 +1000 (EST)
Received: by club.aristocrat.com.au (Interworks_SMTPpost 8.100 June 5, 1996)
id AA01; Wed, 16 Apr 1997 12:13:23
From: AW@null.net (Adam Wilkinson)
Reply-To: AW@null.net (Adam Wilkinson)
Subject: Re: Line problems
In-Reply-To: <861139415.0918137.0@h144.redrose.net>
(from Mush <mpd@mushy-pd.demon.co.uk>)
(on Tue, 15 Apr 97 17:31:18)
Lines: 42
X-Mailer: ADMail 1.7 Copyright 1995 S.T.Brown
To: amos-list@access.digex.net
Date: Wed, 16 Apr 1997 12:13:23
Message-ID: <19970416.86CD3D8.B055@club.aristocrat.com.au>
Status: O
X-Status:
Hi Mush,
> >> OK, ill try and explain this problem again. Im making a perspective
> >> box/rectangle, so naturally, one end will be close, and the other end
> >> smaller, so simulate the depth of the box. Here is an example: (crap
> ASCII art)
>
> I know the top coords of the 2 lines drawn, but it is the top and bottom Y
> coordinates on the actual SLOPES that I need to know quickly
It sounds like you are already using run length slicing.
This is just about the fastest way of drawing a line IF you are coding in
assembly.
You could speed up the inner loop by checking for the gradient before you
start the loop and branching to four seperate routines depending on the
gradient.
/<--45%
|1 /
| / 2
|/____
|\
| \ 3
|4 \
You probably know that already, can you be a little more specific about
what you need? what are you actually doing with the result, and how is this
function to be called? do you calc every value from left to right? do you
need multiple y values for a single x in quadrants 1 and 4.
I guess you use 'If' to avoid a divide?
Division is slow. The bitwise Ror is a faster way to divde by 2. that would
at least give you the centre of the line, I think AMOSPro auto converts
those divisions, but the point is to divide by 2 or 4, not 5...
Hope this helps...
--
Adam.